<template>
  <div class="about-us">
    <HeaderTop :title="`帮助中心`"></HeaderTop>
    <div class="about-us-list">
        <div class="about-us-list-content" v-for="(item,index) in helpColumns" :key="index" @click="toPush(index)">
          <span>{{item.title}}</span>
          <img src="../../../static/images/forget-icon.png" alt="">
        </div>
<!--      <div class="about-us-list-content" @click="toPush(1)">-->
<!--        <span>充值教程</span>-->
<!--        <img src="../../../static/images/forget-icon.png" alt="">-->
<!--      </div>-->
<!--      <div class="about-us-list-content" @click="toPush(2)">-->
<!--        <span>提现指南</span>-->
<!--        <img src="../../../static/images/forget-icon.png" alt="">-->
<!--      </div>-->
<!--      <div class="about-us-list-content" @click="toPush(3)">-->
<!--        <span>常见问题</span>-->
<!--        <img src="../../../static/images/forget-icon.png" alt="">-->
<!--      </div>-->
<!--      <div class="about-us-list-content" @click="toPush(4)">-->
<!--        <span>体育规则说明</span>-->
<!--        <img src="../../../static/images/forget-icon.png" alt="">-->
<!--      </div>-->
<!--      <div class="about-us-list-content" @click="toPush(5)">-->
<!--        <span>真人娱乐规则说明</span>-->
<!--        <img src="../../../static/images/forget-icon.png" alt="">-->
<!--      </div>-->
<!--      <div class="about-us-list-content" @click="toPush(6)">-->
<!--        <span>电子游戏规则说明</span>-->
<!--        <img src="../../../static/images/forget-icon.png" alt="">-->
<!--      </div>-->
<!--      <div class="about-us-list-content" @click="toPush(7)">-->
<!--        <span>彩票游戏规则说明</span>-->
<!--        <img src="../../../static/images/forget-icon.png" alt="">-->
<!--      </div>-->
    </div>
  </div>

</template>

<script>
  import HeaderTop from '../../components/top/top';
  export default {
    name: 'help-center',
    components:{
      HeaderTop,
    },
    data() {
      return {
        helpColumns:[],
        withDrawUrl:'',
      }
    },
    mounted(){
      this.getSysHelpUrl();
    },
    methods:{
      toPush(id){
        switch (id) {
          case 0:
            this.$router.push('/help-recharge')
            break;
          case 1:
            sessionStorage.setItem('queryUrl',this.withDrawUrl)
            this.$router.push('/help-withDraw')
            break;
          // case 3:
          //   this.$router.push('/help-question')
          //   break;
          // case 4:
          //   this.$router.push('/help-TYrules')
          //   break;
          // case 5:
          //   this.$router.push('/help-ZRrules')
          //   break;
          // case 6:
          //   this.$router.push('/help-DZrules')
          //   break;
          // case 7:
          //   this.$router.push('/help-CPrules')
          //   break;
          case 8:
            this.$router.push('/my')
            break;
        }
      },
      getSysHelpUrl(){
        this.showLoading = true;
        let params = {
          gameBigType:2
        }
        this.ServerAPI.postAPI(this.API.HelpCenter,params,(success, data)=>{
          if(success){
            if(data.code=='0000'){
              this.helpColumns = data.data;
              for (let i=0;i<data.data.length;i++) {
                if(data.data[i].title == '提款问题') {
                  this.withDrawUrl = data.data[i].content;
                }
              }
            }else{

            }
          }
        })
      },
    }
  }
</script>

<style lang="scss" scoped>
  .about-us {
    background: #EBECF0;
    padding-top: .2rem;
    height: 100vh;
    color: #000000;
    .about-us-list {
      .about-us-list-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 1.2rem;
        background: #FFFFFF;
        padding: 0 .2rem;
        margin-bottom: .2rem;
        span {
          font-size: .28rem;
        }
        img {
          width: .1rem;
          height: .15rem;
        }
      }
    }
  }
</style>
